<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jet 30</title>

<link href="style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/jquery-1.7.1.min.js"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/json2.js"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/jquery.md5.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>themes/home/css/style.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>themes/default/css/redmond/jquery-ui-1.8.20.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>themes/default/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>themes/default/css/ui.multiselect.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>themes/default/css/regForm.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>themes/default/css/cmxform.css" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo base_url(); ?>themes/home/css/jquery.contextMenu.css" />

<script language="javascript" src="<?php echo base_url(); ?>themes/admin/javascript/check_email.js"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/admin/javascript/general.js"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/ajaxupload.3.5.js"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/i18n/ui.multiselect.js"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/i18n/grid.locale-en.js"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/jquery.layout.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/jquery.jqGrid.min.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/jquery.maskedinput-1.2.2.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/fly-to-basket.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/script.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/home/javascript/jquery.contextMenu.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/default/javascript/jquery.formatCurrency-1.4.0.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo base_url(); ?>themes/home/javascript/header.js" type="text/javascript"></script>



</head>

<!--header start -->
<div id="header">
<ul>
<li><a href="javascript:void(0)"  onclick='window.location.href="<?php echo base_url(); ?>index/place"' class="hover">Trang chủ</a></li>
<li><a href="#">Bán nhà</a></li>
<li><a href="#">Mua nhà</a></li>
<li><a href="#">Thuê nhà</a></li>
<li><a href="#">Cho thuê</a></li>
<li><a href="#">Đăng tin</a></li>
<li><a href="javascript:void(0)" id='add' onclick='processData(this.id);
	getCaptCha();'>Đăng ký</a></li>
<li><a href="#">Trợ giúp</a></li>
<li class="last"><a href="#">Liên hệ</a></li>
</ul>
<a href="<?php echo base_url(); ?>/index"><img src="<?php echo base_url(); ?>themes/home/images/logo.gif" alt="jet 30" width="249" height="72" border="0" class="logo" /></a>
<h1 style='width:350px'>Hệ thống quảng bá thông tin trực tuyến</h1>
<p>Bất động sản, thuê nhà, cho thuê, dịch vụ khác. <span class="txt1"></span> </p>
<img src="<?php echo base_url(); ?>themes/home/images/top_icon.gif" alt="jet 30 says" width="174" height="80" class="icon" />
<p class="topText">
<input type="text" value="" id="inputField" name="q">
<input type="submit" class="submitbutton" value="Tìm kiếm" id='searchsubmit'><br>
<span class="smallTxt">Thông tin mua, bán, thuê, cho thuê nhà...</span></p>
<div id="member1" style="margin-top:40px;float:right;width:370px">
<?php 
$user_id  = $this->session->userdata('sessionUser');
$user_Name=$this->session->userdata('sessionName');

if(($user_id && trim($user_id) != '' && $user_id ='userHome'))
{
?>
   <div style='float:right;margin-right:30px;' id='manaAcount'>
	  <div style='color:#FFFFFF;'>Chào bạn, <b title="Quảm lý thông tin cá nhân"><?php echo $user_Name;?></b></div>
	  <div class="customerLink">
		<div><a style="float:left;margin-right:5px;" title="Quản lý tài khoản cá nhân"  href="../index/person">Quản lý</a></div>
		<div style="float:left;margin-right:5px;"  class="customer_space">|</div>
		<div><a  style="float:left;margin-right:5px;" title="Thoát tài khoản <?php echo $user_Name;?>" href="../user/logout">Thoát [x]</a></div>
		
		</div> 
  </div>
<?php 
}else
{
?>
  <div id='loginArea'>
	  <form id="member_log_in" name="member_log_in" method="post" action='../user/login' enctype="multipart/form-data" >
	    <input class="text ui-widget-content ui-corner-all" type="text" id="usernameLogin" name='user' title='Email đăng nhập' style="float:left;height:20px" size=20  placeholder='Email đăng nhập' >
	    <input class="text ui-widget-content ui-corner-all" type="password" id="passwordLogin" name='pass' style="float:left;height:20px;margin-left:5px;margin-right:5px;" size=20 title='Nhập mật khẩu' placeholder='Mật khẩu'>
		<input type="hidden" name="id" id="id" value="<?php echo session_id()?>" />
		<button type="button"  class='button' style="float:left;height:23px;" onclick="doLogin()">OK</button>
	  </form>
  </div>
 <?php 
}
?> 
  <br class="spacer"/>
</div>
<a href="#" class="readMore"></a>
 <script type="text/javascript">
	function doLogin()
	{
		//if(!CheckLogin())return false;
		if(!CheckHomeLogin())return false;
		$('#member_log_in').submit();
		
/*
		$.ajax
	    ({
	        type: "POST",
	        url: '<?php echo base_url(); ?>index/login',
	        dataType: 'json',
	        async: true,
	        //json object to sent to the authentication url
	        data: $.parseJSON('{"id":"<?php echo session_id() ?>","user":"'+ $('#usernameLogin').val()+'","pass":"'+$('#passwordLogin').val() +'"}')
	       ,success:function(msg)
	       {	 
	        } 
	    }).done(function( msg ) 
	    {
			if(msg.status==$.check('<?php echo session_id()?>'))
			{
	    	  //document.location.href='<?php echo base_url().'admin/defaults/defaults'?>';
		    	  alert('login thanh cong');
		    	  $('#loginArea').css('display','none');
		    	  $('#manaAcount').css('display','');
			}else
			{
				alert('Sai username hoac mat khau!');
			}		
	   });
	*/
	}
</script>
</div>
<!--header end -->

